import { Component, OnInit, Input, Output } from '@angular/core';

@Component({
  selector: 'app-list5',
  templateUrl: './list5.component.html',
  styleUrls: ['./list5.component.scss']
})
export class List5Component implements OnInit {

  constructor() { }

  @Input() c6:number;
  @Input() d6:number;
  @Input() g6:number;
  @Input() h6:number;
  @Input() c10:number;
  @Input() d10:number;
  @Output() e10:number;
  @Output() f10:number;
  @Output() g10:number;
  @Input() h10:number;
  @Input() i10:number;
  @Output() j10:number;
  @Output() k10:number;
  @Output() l10:number;
  
  @Input() c11:number;
  @Input() d11:number;
  @Output() e11:number;
  @Output() f11:number;
  @Output() g11:number;
  @Input() h11:number;
  @Input() i11:number;
  @Output() j11:number;
  @Output() k11:number;
  @Output() l11:number;

  @Input() c12:number;
  @Input() d12:number;
  @Output() e12:number;
  @Output() f12:number;
  @Output() g12:number;
  @Input() h12:number;
  @Input() i12:number;
  @Output() j12:number;
  @Output() k12:number;
  @Output() l12:number;

  @Input() c13:number;
  @Input() d13:number;
  @Output() e13:number;
  @Output() f13:number;
  @Output() g13:number;
  @Input() h13:number;
  @Input() i13:number;
  @Output() j13:number;
  @Output() k13:number;
  @Output() l13:number;

  @Input() c14:number;
  @Input() d14:number;
  @Output() e14:number;
  @Output() f14:number;
  @Output() g14:number;
  @Input() h14:number;
  @Input() i14:number;
  @Output() j14:number;
  @Output() k14:number;
  @Output() l14:number;

  @Input() c15:number;
  @Input() d15:number;
  @Output() e15:number;
  @Output() f15:number;
  @Output() g15:number;
  @Input() h15:number;
  @Input() i15:number;
  @Output() j15:number;
  @Output() k15:number;
  @Output() l15:number;

  @Output() c16:number;
  @Output() d16:number;
  @Output() e16:number;
  @Output() f16:number;
  @Output() g16:number;
  @Output() h16:number;
  @Output() i16:number;
  @Output() j16:number;
  @Output() k16:number;
  @Output() l16:number;

  @Output() j17:number;
  @Output() k17:number;
  @Output() l17:number;

  ngOnInit() {
    this.c6 = 250;
    this.d6 = 250;
    this.g6 = 70;
    this.h6 = 69;

    this.c10 = 67.69;
    this.d10 = -10.00;
    this.h10 = 880;
    this.i10 = 900;

    this.c11 = 13.80;
    this.d11 = 10.00;
    this.h11 = 959;
    this.i11 = 960;

    this.c12 = 10.00;
    this.d12 = 0;
    this.h12 = 890;
    this.i12 = 890;

    this.c13 = 6.00;
    this.d13 = 0.00;
    this.h13 = 803;
    this.i13 = 803;

    this.c14 = 2.40;
    this.d14 = 0.00;
    this.h14 = 726;
    this.i14 = 730;

    this.c15 = 0.11;
    this.d15 = 0.00;
    this.h15 = 512;
    this.i15 = 512;

    this.recal();
  }

  recal(){
    this.f16 = this.c6 * this.g6 / 100.00;
    this.g16 = this.d6 * this.h6 / 100.00;

    this.e10 = this.c10 + this.d10;
    this.f10 = (this.c10/100) * this.f16;
    this.g10 = (this.e10/100) * this.g16;
    this.j10 = this.f10 * this.h10;
    this.k10 = this.g10 * this.i10;
    this.l10 = this.k10 - this.j10;

    this.e11 = this.c11 + this.d11;
    this.f11 = (this.c11/100) * this.f16;
    this.g11 = (this.e11/100) * this.g16;
    this.j11 = this.f11 * this.h11;
    this.k11 = this.g11 * this.i11;
    this.l11 = this.k11 - this.j11;

    this.e12 = this.c12 + this.d12;
    this.f12 = (this.c12/100) * this.f16;
    this.g12 = (this.e12/100) * this.g16;
    this.j12 = this.f12 * this.h12;
    this.k12 = this.g12 * this.i12;
    this.l12 = this.k12 - this.j12;

    this.e13 = this.c13 + this.d13;
    this.f13 = (this.c13/100) * this.f16;
    this.g13 = (this.e13/100) * this.g16;
    this.j13 = this.f13 * this.h13;
    this.k13 = this.g13 * this.i13;
    this.l13 = this.k13 - this.j13;

    this.e14 = this.c14 + this.d14;
    this.f14 = (this.c14/100) * this.f16;
    this.g14 = (this.e14/100) * this.g16;
    this.j14 = this.f14 * this.h14;
    this.k14 = this.g14 * this.i14;
    this.l14 = this.k14 - this.j14;

    this.e15 = this.c15 + this.d15;
    this.f15 = (this.c15/100) * this.f16;
    this.g15 = (this.e15/100) * this.g16;
    this.j15 = this.f15 * this.h15;
    this.k15 = this.g15 * this.i15;
    this.l15 = this.k15 - this.j15;

    this.c16 = this.c10 + this.c11 + this.c12 + this.c13 + this.c14 + this.c15;
    this.d16 = this.d10 + this.d11 + this.d12 + this.d13 + this.d14 + this.d15;
    this.e16 = this.e10 + this.e11 + this.e12 + this.e13 + this.e14 + this.e15;
    this.f16 = this.f10 + this.f11 + this.f12 + this.f13 + this.f14 + this.f15;
    this.g16 = this.g10 + this.g11 + this.g12 + this.g13 + this.g14 + this.g15;
    this.j16 = this.j10 + this.j11 + this.j12 + this.j13 + this.j14 + this.j15;
    this.k16 = this.k10 + this.k11 + this.k12 + this.k13 + this.k14 + this.k15;
    this.l16 = this.l10 + this.l11 + this.l12 + this.l13 + this.l14 + this.l15;

    this.j17 = this.j16 * 365;
    this.k17 = this.k16 * 365;
    this.l17 = this.l16 * 365;
  }
}
